/**
 * @Author: 陈瑞鹏
 * @Date:   2022-10-17 14:24:08
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-10-17 14:28:14
 */
import mongoose from 'mongoose';

const Schema = mongoose.Schema;
const EquipSchema: mongoose.Schema = new Schema({
    roleId: { type: Number, desc: '角色Id', index: true },
    id: { type: Number, desc: '装备ID' },
    name: { type: String, desc: '装备名字' },
    tzName: { type: String, desc: '套装名字' },
    group: { type: Number, desc: '套装组' },
    part: { type: Number, desc: '装备部位' },
    useLv: { type: Number, desc: '装备等级' },
    maxQhLv: { type: Number, desc: '最高强化等级' },
    qhLv: { type: Number, desc: '强化等级', default: 1 },
    xlLv: { type: Number, desc: '洗练等级', default: 0 },
    attributeType0: { type: Number, desc: '属性类型 1生命，2攻击，3防御，4暴击率 5暴击伤害 6自动恢复生命' },
    attributeNum0: { type: Number, desc: '装备属性' },
    attributeType1: { type: Number, desc: '属性类型 1生命，2攻击，3防御，4暴击率 5暴击伤害 6自动恢复生命' },
    attributeNum1: { type: Number, desc: '装备属性' },
    isWear: { type: Boolean, desc: '是否穿戴', default: false },
    growUp: { type: Number, desc: '成长值' },
    affix: { type: Array, desc: '词缀' },
}, { versionKey: false }).index({ roleId: 1, isWear: 1 });

const Equip = mongoose.model('Equip', EquipSchema);
export default Equip;